const path = require('path');
module.exports = {
  ssr: false,
  srcDir: 'client',
  head: {
    title: 'PA-WebIDE',
    script: [
      { src: 'lib/bro-fs.min.js' },
      { src: 'index.js', type: 'module' }
    ]
  },
  // some nuxt config...
  plugins: [
    { src: '~plugins/index', ssr: false }
  ],
  // some nuxt config...
  css: [
    '~/assets/css/style.css'
    // ...
    // 'codemirror/lib/codemirror.css',
    // 'codemirror/theme/base16-dark.css',
    // more styles...
  ],
  build: {
    // loading: false
  },
  alias: {
    '~cropperjs': path.resolve('node_modules', 'cropperjs'),
    '~codemirror': path.resolve('node_modules', 'codemirror')
  },
  serverMiddleware: [
    /*
    { path: '/file-manager', handler: (req, res, next) => {
      res.end(JSON.stringify({code: '000000'}));
      next();
    } },
    */
    { path: '/file-manager', handler: '~/server-middle-wave/file-manager.js' }
  ]
  // some nuxt config...
}

